Network Info
data class NetworkInfo(val activeNetwork: ActiveNetwork? = null, val wifi: List<NetworkInterface> = emptyList(), val ethernet: List<NetworkInterface> = emptyList()) : Parcelable
The NetworkInfo will contain a list of the wifi and ethernet interfaces as well as the information of the currently active network. Due to the fact that the network info can only be obtained on the active network, the active network info is provided separately from the network interfaces.
When multiple connections are available, the active network will be the one determined by the network score set by the AOSP or custom firmware for the connected networks.
Constructors
Link copied to clipboard
constructor(activeNetwork: ActiveNetwork? = null, wifi: List<NetworkInterface> = emptyList(), ethernet: List<NetworkInterface> = emptyList())